<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="js/jquery/themes/default/easyui.css">
        <link rel="stylesheet" type="text/css" href="js/jquery/themes/icon.css">
        <link rel="stylesheet" type="text/css" href="js/jquery/plugins/treeview/jquery.treeview.css">
        <script type="text/javascript" src="js/jquery/jquery-1.4.4.min.js"></script>
        <script type="text/javascript" src="js/jquery/plugins/treeview/jquery.treeview.js"></script>
        <title>juqery study.</title>

        <script type="text/javascript">
            function showTree(url){
                $.ajax({url: url, type: "POST" , dataType: "html", success: function(data){
                        $("#treeDiv").html("");
                        $("#treeDiv").html(data);
                        $("#treeDiv").treeview({persist: "location",collapsed: true,unique: false});
                    }});
            }

        </script>

    </head>

    <body>
        <div id="linkDiv">
            <a href="javascript:void(0);" onclick="showTree('menutree.dc?viewName=fregment');">fregment</a>
            <a href="javascript:void(0);" onclick="showTree('menutree.dc?viewName=fregment2');">fregment2</a>
        </div>
        <div id="treeDiv">

        </div>
        <div>
            <ul id="tt1" class="easyui-tree" animate="true" dnd="true">
                <span><strong>tt1Tree</strong></span>
                <li><span state="closed" class="folder">TotalFolder</span>
                    <ul><li><span>file1-1</span></li></ul>
                    <li><span class="folder" state="open">folder2</span>
                        <ul>
                            <li><span>file2-1</span></li>
                            <li><span>file2-2</span></li>
                        </ul>
                    </li>
                </li>
            </ul>
        </div>
    </body>
</html>
